<?php
  include("include/config.inc.php");
  
  $tableId = $_REQUEST['tableId'];
  $itemId = $_REQUEST['itemId'];
  $tablePart = $_REQUEST['tablePart'];
  $waiterId = $_REQUEST['waiterId'];
 echo $selectQuantity = "SELECT ordereditems.quantity 
                       FROM ordereditems 
                       JOIN ordermaster 
                         ON ordereditems.orderId = ordermaster.orderId 
                      WHERE ordereditems.itemId='$itemId' 
                        AND ordermaster.tableId = '$tableId'
                        AND ordermaster.tablePart = '$tablePart'
                        AND ordermaster.waiterId = '$waiterId'
                        AND orderstatus='L'"
?>